import { createRouter, createWebHistory } from 'vue-router'

import Login from '@/views/Login/index.vue'
import Menu from '@/views/Menu/index.vue'

import Vito from '@/views/Layout/Vito/index.vue'
import Judge from '@/views/Layout/judge/index.vue'


import Ranking from '@/views/Layout/Ranking/index.vue'
import User from '@/views/Layout/User/index.vue'
import Comment from '@/views/Layout/Comment/index.vue'
import Notification  from '@/views/Layout/Notification/index.vue'


import My from '@/views/Layout/My/my.vue'
import UserInfor from '@/components/My/userInfor.vue'
import UpdatePassword from  '@/components/My/updatePassword.vue'



const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login,
    },	
    {
    path: '/menu',
    name: 'menu',
    component: Menu,
    redirect: '/menu/Judge',
    children: [
      {
        name: 'vito',
        path: 'vito',
        component: Vito
      },
      {
        name: 'judge',
        path: 'judge',
        component: Judge
      },
      {
        name: 'ranking',
        path: 'ranking',
        component: Ranking
      }
      ,
      {
        name: 'comment',
        path: 'comment',
        component: Comment
      }
      ,
      {
        name: 'notification',
        path: 'notification',
        component: Notification
      }
      ,
      {
        name: 'user',
        path: 'user',
        component: User
      }	,	{
        name:'wode',
        path:'my',
        component:My,
        children:[
          {
            path:"userInfor",
            component:UserInfor		
          },
          {
            path:"updatePassword",
            component:UpdatePassword		
          }
        ]
      }	
    ]
  }
  ],
})

export default router
